package com.dormitory.management.system.controller;


import com.dormitory.management.system.entity.RepairType;
import com.dormitory.management.system.service.RepairTypeService;
import com.dormitory.managemnet.util.core.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 报修类型表 前端控制器
 * </p>
 *
 * @author
 * @since 2021-12-17
 */
@Api(tags = "维修类型管理")
@RestController
@RequestMapping("/repair-type")
public class RepairTypeController {
    @Autowired
    private RepairTypeService repairTypeService;

    @ApiOperation("报修类型列表")
    @RequestMapping(value = "/list",method = RequestMethod.POST)
    public Result<List<RepairType>> getList(){
        return Result.ok(repairTypeService.list());
    }
}
